<%@page import="db_interaction.Amigos"%>
<%@page import="com.mysql.jdbc.Util"%>
<%@page import="db_interaction.Grupo_Utilizador"%>
<%@page import="db_interaction.Mensagens"%>
<%@page import="db_interaction.Publicacao_Comentario"%>
<%@page import="db_interaction.Comentario"%>
<%@page import="java.util.ArrayList"%>
<%@include file="header_general.jsp"%>

<div class="mainbar">


    <%
        Amigos amigos_user = new Amigos();
        List<Utilizador> amigos_user_login = null;

        amigos_user_login = amigos_user.SelectUserFriends((String) session.getAttribute("email"));
        out.print("<div id='amigos_div'>");
        out.print("<form method='post' id='newmessage' action='/TheHive/messages/CreateMessage.jsp'>");
        out.print("<select>");
        for (int i = 0; i < amigos_user_login.size(); i++) {
            out.print("<option name='" + amigos_user_login.get(i).getid() + "' value='" + amigos_user_login.get(i).getid() + "'>" + amigos_user_login.get(i).getNome() + "</option>");
        }
        out.print("</select>");
        out.print("<input name='ButtonCreateMessage' type='submit' value='Create Message' id='ButtonCreateMessage' class='ButtonCreateMessage' style='margin-left: 600px; width: 110px; height:40px'/>");
        out.print("</form>");
        out.print("</div>");
    %>

</div>

<%@include file="sidebar_general.jsp"%>